package com.cloud.DrugManagement.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cloud.DrugManagement.pojo.Supplier;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author zhozixiong
 * @date 2023/02/08
 */
@Mapper
@Repository
public interface SupplierMapper extends BaseMapper<Supplier> {

    Page<Supplier> searchAllBySidOrSname(Page page, @Param("parameter") Object parameter);

    Supplier searchAllBySid(@Param("sid") int sid);

    int updateSnameBySid(@Param("sname") String sname, @Param("sid") Integer sid);

    int delBySid(@Param("sid") Integer sid);

    @Override
    int insert(@Param("supplier") Supplier supplier);
}
